/**
 * Created by IntelliJ IDEA.
 * User: Taras_Brzezinsky
 * Date: 8/7/11
 * Time: 3:11 PM
 * To change this template use File | Settings | File Templates.
 */

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.FileReader;
import java.util.StringTokenizer;
import java.io.IOException;
import java.util.Arrays;

public class RussianRoulette extends Thread {

    public RussianRoulette() {
        this.input = new BufferedReader(new InputStreamReader(System.in));
        this.output = new PrintWriter(System.out);
        this.setPriority(Thread.MAX_PRIORITY);
    }

    static class Solver {
        long sureNo, probableYes;
        public Solver(long n, long k) {
            sureNo = Math.max(0, n - 2 * k);
            probableYes = Math.min(n - k, k ) * 2;
            if (Math.min(sureNo & 1, probableYes)!= 0) {
                ++sureNo;
                probableYes -= 2;
            }
        }
        public char decide(long where) {
            if (where <= sureNo) {
                return '.';
            } else {
                if (where <= sureNo + probableYes) {
                    long temporary = where - sureNo;
                    return temporary % 2 == 0 ? 'X' : '.';
                } else {
                    return 'X';
                }
            }
        }
    }

    public void run() {
        try {
            long n = nextLong(), k = nextLong(), p = nextInt();
            Solver blackBox = new Solver(n, k);
            for (int i = 0; i < p; ++i) {
                output.print(blackBox.decide(nextLong()));
            }

            output.flush();
            output.close();

        } catch (Throwable e) {
            System.err.println(e.getMessage());
            System.err.println(Arrays.deepToString(e.getStackTrace()));
        }
    }


    public static void main(String[] args) {
        new RussianRoulette().start();
    }

    private String nextToken() throws IOException {
        while (tokens == null || !tokens.hasMoreTokens()) {
            tokens = new StringTokenizer(input.readLine());
        }
        return tokens.nextToken();
    }

    private int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    private double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    private long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }


    private BufferedReader input;
    private PrintWriter output;
    private StringTokenizer tokens = null;
}
